cmake_minimum_required(VERSION 3.10.2)
project(timewheel)
find_package(Threads)
set(CMAKE_CXX_STANDARD 17) 
add_definitions("-Wall -g")

file(GLOB_RECURSE utils_srcs  ../../server/base/src/*.cpp)
file(GLOB_RECURSE datatime_srcs ../../server/datetime/src/*.cpp)
file(GLOB_RECURSE logger_srcs ../../server/logging/src/*.cpp)
file(GLOB_RECURSE thread_srcs  ../../server/thread/src/*.cpp)
file(GLOB_RECURSE net_srcs  ../../server/net/src/*.cpp)

add_executable(rpc ./src/RpcCodec.cpp ../protobuf/ProtobufCodecLite.cpp RpcCodec_test.cpp rpc.pb.cc ${logger_srcs} ${utils_srcs} ${thread_srcs} ${net_srcs} ${datatime_srcs})
target_link_libraries(rpc protobuf z ${CMAKE_THREAD_LIBS_INIT})